Skip to main content
Version: Windows SDK 3.2.0

Events subscribers

Register events delegate

RegisterEventsDelegate

Registers a delegate for the SDK events. Method getAsyncInterface in HapiFactory executes internally this subscription.

Parameters
ParameterNotes
listener Required
Object
Any Object implementing one or more of the available delegate interfaces

Code example

public class ObjectHelper : Events.Required, Events.Status, Events.Log {
...
private void RegisterEventHandler() {
// Register this class as listener for events
this.api.RegisterEventsDelegate(this);
...
}

}

Returns

ParameterNotes
BooleanTrue if the new delegate was added successfully.

Unregister events delegate

UnregisterEventsDelegate

Unregisters an object from SDK events.

Parameters

ParameterNotes
listener Required
Object
Any Object implementing one or more of the available delegate interfaces

Code example

public class ObjectHelper : Events.Required, Events.Status, Events.Log {
...
private void Unsubscribe() {
// Stop receiving events
this.api.UnregisterEventsDelegate(this);
...
}

Returns

ParameterNotes
BooleanTrue if the new delegate was removedded successfully.